* Replication file for Timothy J. Ryan, "Reconsidering Moral Issues in Politics," JOP 2014.
* Questions, contact TJRyan@umich.edu

* This file produces Figure 2.

cd "/Users/TJRyan/Dropbox/morality/YM/6_replication"
use egss.dta, clear
gen one = 1
set scheme sj

foreach iss in budg afghan educ health imm econ abort gaymar enviro unemp {
	preserve
	collapse (p10) p10=`iss'mor (p25) p25=`iss'mor (p75) p75=`iss'mor (p90) p90=`iss'mor (median) med=`iss'mor (mean) mean=`iss'mor (count) one=one [pw=poststrat], by(`iss'mortype)
	drop if `iss'mortype==.
	list one
	twoway rcap p75 p25 `iss'mortype, ///
	lwidth(medthick) lcolor(black) ysc(r(0(.2)1)) ylab(0(.2)1, nogrid) ///
	|| scatter mean `iss'mortype, /// 
	xscale(r(-.3 2.3)) xtitle("") msymbol(square) ytitle("") xtitle("`iss'") ///
	mcolor(black) msize(large) legen(off) xlab(0 "Most" 1 "Random" 2 "Least") ///
	yline(0 .2 .4 .6 .8 1, lstyle(grid)) ///
	|| scatter p10 `iss'mortype, msymbol(+) mcolor(black) msize(large) ///
	|| scatter p90 `iss'mortype, msymbol(+) mcolor(black) msize(large)
	graph save "`iss'mordist", replace
	restore
	}

graph combine educmordist.gph gaymarmordist.gph healthmordist.gph abortmordist.gph econmordist.gph ///
enviromordist.gph afghanmordist.gph immmordist.gph unempmordist.gph budgmordist.gph, rows(2)
